@import 'mixins';
@import 'boniu/variables';
@import 'boniu/mixins';
@import 'boniu/lesshat';
@import 'boniu/_dialog';

.frame-container {
    position: absolute;
    position: relative;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    padding-left: @sidebar_menu_width;
    width: 100%;
    overflow: hidden;
    .clearfix;

    .logo-env {
        width: 100%;
        padding: @base_padding (@inner_padding + @base_margin / 2);
        .bs;
        .clearfix;
        .user-select;
        > div {
            display: block;
            vertical-align: middle;
            white-space: nowrap;
            float: left;
            > a {
                display: inline-block;
                color: @main_text_color;
            }
        }
    }
    .sidebar-menu {
        position: absolute;
        width: 280px;
        top: 0;
        left: 0;
        bottom: 0;
        background: #303641;
        color: #aaabae;
        z-index: 1;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    .main-menu {
        list-style: none;
        margin: 0;
        padding: 0;
        margin-bottom: @inner_padding;
        .user-select;
        li {
            position: relative;
            margin: 0;
            font-size: @p_size;
            border-bottom: 1px solid fade(@main_border_color, 70%);

            i {
                position: relative;
                font-size: 15px;
                margin-right: @base_padding / 2;
            }

            a {
                position: relative;
                display: block;
                padding: @base_padding @inner_padding;
                color: @main_text_color;
                z-index: 2;
                text-decoration: none;
                .transition(~"color 250ms ease-in-out, background-color 250ms ease-in-out");

                i {
                    top: 1px;
                    display: inline-block;
                }

                span {
                    .transition(~"350ms opacity ease-in-out");
                }

                &:hover {
                    background-color: fade(@main_border_color, 30%);
                    color: @menu_active_text_color;
                }

                .badge {
                    position: relative;
                    float: right;
                    font-size: 11px;
                    line-height: 1.3;

                    &.badge-primary {
                        border: 1px solid @main_border_color;
                        top: -1px;
                    }
                }
            }

            &.active {

                > a {
                    background-color: @menu_active_color;
                    color: @menu_active_text_color;
                }
            }

            &.has-sub {

                > a:before {
                    position: relative;
                    content: '\e877';
                    content: '\e879';
                    display: inline-block;
                    font-family: @font_entypo;
                    color: @main_border_color;
                    color: #FFF;
                    float: right;
                    font-size: 15px;
                    margin-left: @base_padding + 3;
                    top: 0px;
                    .transall;
                }

                &.opened > a:before {
                    .rotate(90deg);
                }
            }

            // Submenu (level 1)
            ul {
                position: relative;
                list-style: none;
                padding: 0;
                margin: 0;
                border-top: 1px solid fade(@main_border_color, 40%);
                display: none;
                overflow: hidden;
                z-index: 1;

                &.visible {
                    display: block;
                }

                > li {
                    border-bottom: 1px solid fade(@main_border_color, 40%);

                    > a {
                        background-color: @submenu_color;
                        padding-left: @inner_padding * 2;

                        &:hover {
                            background-color: lighten(@submenu_color, 1%);
                        }
                    }
                    &:last-child {
                        border-bottom: 0;
                    }
                    // Submenu (level 2)
                    ul {
                        > li {
                            > a {
                                padding-left: @inner_padding * 3;
                                background: @main_active_color;
                            }
                            // Submenu (level 3)
                            ul {
                                > li {
                                    > a {
                                        padding-left: @inner_padding * 4;
                                        background: @main_active_color;
                                    }
                                    // Submenu (level 4)
                                    ul {
                                        > li {
                                            > a {
                                                padding-left: @inner_padding * 5;
                                                background: @main_active_color;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }

    .menu-wrap {
        position: relative;
    }
    .menu-frame {
        padding: 0;
        height: 400px;
        overflow: hidden;
    }
    .scrollbar {
        position: absolute;
        right: 2px;
        z-index: 1;
        width: 2px;
        background: #ccc;
        line-height: 0;
        height: 400px;
        .handle {
            width: 100%;
            background: #fff;
            cursor: pointer;
        }
    }
    .main-content {
        float: left;
        width: 100%;
        z-index: 2;
        background: @background_color;
        .bs;
    }
    .top-nav {
        height: 50px;
        background-color: #303641;
        border-bottom: 1px solid #303641;
        .links-list {
            margin-bottom: 0;
            li {
                &:last-child {
                    padding-right: 0;
                }
                a {
                    display: inline-block;
                    padding-left: 12px;
                    padding-right: 12px;
                    height: 50px;
                    line-height: 50px;
                    color: #fff;
                    &:hover {
                        color: #fafafa;
                        text-decoration: none;
                        background-color: lighten(#303641, 15%);
                    }
                }
            }
        }
    }

    .frame-page {
        width: 100%;
        height: 100%;
    }
}

@-webkit-keyframes sk-scaleout {
    0% {
        -webkit-transform: scale(0)
    }
    100% {
        -webkit-transform: scale(1.0);
        opacity: 0;
    }
}

@keyframes sk-scaleout {
    0% {
        -webkit-transform: scale(0);
        transform: scale(0);
    }
    100% {
        -webkit-transform: scale(1.0);
        transform: scale(1.0);
        opacity: 0;
    }
}

@-webkit-keyframes sk-foldCubeAngle {
    0%, 10% {
        -webkit-transform: perspective(140px) rotateX(-180deg);
        transform: perspective(140px) rotateX(-180deg);
        opacity: 0;
    }
    25%, 75% {
        -webkit-transform: perspective(140px) rotateX(0deg);
        transform: perspective(140px) rotateX(0deg);
        opacity: 1;
    }
    90%, 100% {
        -webkit-transform: perspective(140px) rotateY(180deg);
        transform: perspective(140px) rotateY(180deg);
        opacity: 0;
    }
}

@keyframes sk-foldCubeAngle {
    0%, 10% {
        -webkit-transform: perspective(140px) rotateX(-180deg);
        transform: perspective(140px) rotateX(-180deg);
        opacity: 0;
    }
    25%, 75% {
        -webkit-transform: perspective(140px) rotateX(0deg);
        transform: perspective(140px) rotateX(0deg);
        opacity: 1;
    }
    90%, 100% {
        -webkit-transform: perspective(140px) rotateY(180deg);
        transform: perspective(140px) rotateY(180deg);
        opacity: 0;
    }
}

.frame-layer {
    .loading {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 100;
        width: 100%;
        background-color: #fafafa;
        .spinner {
            width: 40px;
            height: 40px;
            margin: 20% auto;
            background-color: #303641;
            border-radius: 100%;
            -webkit-animation: sk-scaleout 1.0s infinite ease-in-out;
            animation: sk-scaleout 1.0s infinite ease-in-out;
        }
        .sk-folding-cube {
            margin: 18% auto;
            width: 40px;
            height: 40px;
            position: relative;
            -webkit-transform: rotateZ(45deg);
            transform: rotateZ(45deg);
        }

        .sk-folding-cube .sk-cube {
            float: left;
            width: 50%;
            height: 50%;
            position: relative;
            -webkit-transform: scale(1.1);
            -ms-transform: scale(1.1);
            transform: scale(1.1);
        }
        .sk-folding-cube .sk-cube:before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: #303641;
            -webkit-animation: sk-foldCubeAngle 2.4s infinite linear both;
            animation: sk-foldCubeAngle 2.4s infinite linear both;
            -webkit-transform-origin: 100% 100%;
            -ms-transform-origin: 100% 100%;
            transform-origin: 100% 100%;
        }
        .sk-folding-cube .sk-cube2 {
            -webkit-transform: scale(1.1) rotateZ(90deg);
            transform: scale(1.1) rotateZ(90deg);
        }
        .sk-folding-cube .sk-cube3 {
            -webkit-transform: scale(1.1) rotateZ(180deg);
            transform: scale(1.1) rotateZ(180deg);
        }
        .sk-folding-cube .sk-cube4 {
            -webkit-transform: scale(1.1) rotateZ(270deg);
            transform: scale(1.1) rotateZ(270deg);
        }
        .sk-folding-cube .sk-cube2:before {
            -webkit-animation-delay: 0.3s;
            animation-delay: 0.3s;
        }
        .sk-folding-cube .sk-cube3:before {
            -webkit-animation-delay: 0.6s;
            animation-delay: 0.6s;
        }
        .sk-folding-cube .sk-cube4:before {
            -webkit-animation-delay: 0.9s;
            animation-delay: 0.9s;
        }
    }
}

.frame-fade {
    background: @main_color;
    .transition(~"400ms all ease-in-out");
    .transform-origin(50% 30%);

    > .frame-container {
        .transform(~"scale(0.9) translateY(100px)");
        .transition(~"400ms all ease-in-out");
        .opacity(0);
    }

    &-init {
        background: @background_color;

        > .frame-container {
            .transform(~"scale(1) translateY(0)");
            .opacity(1);
        }
    }
}

.frame-right-in {
    background: @main_color;
    overflow-x: hidden;
    .transition(~"400ms all ease-in-out");
    .transform-origin(100% 50%);
    .perspective(1000);
    > .frame-container {
        .transform(~"rotateY(-8deg) translateX(100px)");
        .transition(~"400ms all ease-in-out");
        .opacity(0);
    }

    &-init {
        background: @background_color;
        > .frame-container {
            .transform(~"rotateY(0deg) translateX(0px)");
            .opacity(1);
        }
    }
}

.frame-fade-only {
    background: @main_color;
    .transition(~"600ms all cubic-bezier(0.445, 0.050, 0.550, 0.950)");
    .transform-origin(50% 30%);

    > .frame-container {
        .transition(~"600ms all cubic-bezier(0.445, 0.050, 0.550, 0.950)");
        .opacity(0);
    }

    &-init {
        background: @background_color;

        > .frame-container {
            .opacity(1);
        }
    }
}